<%@page import="com.sun.org.apache.xalan.internal.xsltc.runtime.Parameter"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
String loggedInUserName = (String)session.getAttribute("userName");

String loggedInUserPassword = (String)session.getAttribute("userPassword");

String loggedInUserRole = (String)session.getAttribute("userRole");

int userID = (Integer)session.getAttribute("userID");




out.print(loggedInUserName);
out.print(loggedInUserPassword);
out.print(loggedInUserRole);

if(loggedInUserName == null || loggedInUserPassword == null || loggedInUserRole == null)
{
    response.sendRedirect("login1.jsp?error= Wrong Username or Password");
}
if(!(loggedInUserRole.equals("Moderator")))
{
response.sendRedirect("login1.jsp?error=You have Logged in as a "+loggedInUserRole+ "Role." );//If you want to access Inspector Role, you need to log out from "+loggedInUserRole+ "role and then log in again for Inspector
}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Yellow Effects by CMG Technologies</title>
<link href="yellow-effectz.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">


function loadMeetings(userId)
{
    
    alert(userId);
    
    
    
    
    //:::::::::::::::: Ajax call for retrieving meetings :::::::::::::::::://
    
	var xmlhttp;


if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari

//alert("Received");

xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5

    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
//        document.getElementById('dd2').innerHTML = xmlhttp.responseText;newInspections
//document.getElementById("newInspections").innerHTML = xmlhttp.responseText;
alert(xmlhttp.responseText);
//document.getElementById('qqq').innerHTML = xmlhttp.responseText;
//alert(xmlhttp.responseText);
}
}
xmlhttp.open("GET","MeetingController?action=getMeetings&moderatorID="+userId,true);
xmlhttp.send();

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    //:::::::::::::::: Ajax call for retrieving :::::::::::::::::://
}
function Inspectorchecked(){
	
	
	
	alert(" one or more inspectors have Selected");
	}

</script>
</head>

    <body onload="loadMeetings('<%=userID%>')">
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="50%" height="120"><table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="42" valign="bottom"><a href="index.jsp" class="logo">Pensieve</a></td>
          </tr>
          <tr>
    <td><a href="index.jsp" class="tag">A SOftware Requirement Inspection Software</a></td>
          </tr>
        </table></td>
        <td valign="bottom" style="padding-bottom:8px;"><table width="60%" border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>
            <td width="15"><img src="images/img04.gif" alt="Home" width="11" height="10" /></td>
            <td><a href="index.jsp" class="topmenu">Admininistrator</a></td>
            <td width="15">&nbsp;</td>
            <td>&nbsp;</td>
            <td width="15">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="10"></td>
  </tr>
  <tr>
    <td height="40"><table width="70%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td width="32%"><a href="index.jsp" class="toplinks">Meetings</a></td>
       
        <td width="14%"><a href="MainControler?action=Logout" class="toplinks">Log Out</a></td>
        <td width="1%">&nbsp;</td>
        <td width="6%">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="220" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="boxed" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td class="boxtitle">Meetings</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="date">&nbsp;</td>
              </tr>
              <tr>
               
                <td height="50"><a href="index.jsp" class="smallred ">1) Meeting 1</a></td>
                  </tr>
                  <tr>
                    <td class="date">&nbsp;</td>
              </tr>
              <tr>
                <td height="50"><a href="selectimpotchecklist.jsp" class="smallred">2) Meeting 2</a></td>
                  </tr>
              <tr>
                <td class="date">&nbsp;</td>
              </tr>
              <tr>
                <td height="50"><a href="chooseInspector.jsp" class="smallred Selected">3) Meeting 3</a></td>
                
              </tr>
               <tr>
                <td height="50"><a href="choosemod.jsp" class="smallred">4) Meeting 4</a></td>
                
              </tr> </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><a href="#" class="smallred"></a></td>
          </tr>
          <tr>
            
          </tr>
        </table></td>
        <td valign="top" style="padding-left:12px; text-align:justify; line-height:190%; padding-top:10px;">
          <h2 class="welcome">Meeting 3</h2>
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="1" bgcolor="#CCCCCC">
              <div id="selectInspector">
                <a  class="colorit" href="Simple/moderator.jsp">Defect Log by Inspector Arslan
</a><br />

                <a class="colorit">Defect Log by Inspector Hashaam</a><br />

                <a class="colorit">Defect Log by Inspector ttttttt</a></div></td>
            </tr>
          </table>

</td>
      </tr>
    </table></td>
  </tr>
  <tr>
<td height="1" bgcolor="#CCCCCC"></td>
  </tr>
  <tr>
    <td align="center"><p id="legal">All Right Reserved &copy; 2011, Designed by FAST_Pensive</p></td>
  </tr>
</table>
</body>
</html>
